This command will sort the slides of your stack by the slide numbers. (See the SHOW SLIDE NUMBERS command.) To put the slides in a different order, show the present numbers, then assign new numbers corresponding to the order you want, then invoke the SORT SLIDES command.
The newly assigned numbers need not be consecutive, nor need they be whole numbers. For example, three slides (plus the special final slide) could be renumbered 50, 20, and 10 (and 999) respectively. Sorting would then arrange them in the order 10, 20, 50 (and 999). Thus what had previously been the third slide would become the first, and what had previously been first would become third. Renumbering them 1.3, 1.2 and 1.1 (and leaving the special final slide numbered 999) and sorting would have produced the same final order.